//https://leetcode.cn/problems/reverse-string/
package codeRandomThoughts.Test344反转字符串;

//二刷
public class Solution2 {
    public void reverseString(char[] s) {
        //双指针交换
        int left = 0;
        int right = s.length-1;
        while (left<right){
            char tem = s[right];
            s[right]=s[left];
            s[left]=tem;
            left++;
            right--;
        }
    }
}
